﻿using Medianamik.Core.DAL;
using Medianamik.Core.DAL.Repositories;
using Medianamik.Core.DAL.Services;
using SubSonic;

namespace Medianamik.UI.Web.Shop.Data.Repositories
{
    public class ProductsInCategoriesRepository<TCollection, TItem> : MedianamikRepository<TCollection, TItem>,
        IProductsInCategoriesRepository<TItem>
        where TItem : Interfaces.IProductsInCategories, IRecordBase, new()
        where TCollection : ICollectionWithChildren<TCollection, TItem>, new()
    {
        public ProductsInCategoriesRepository(ICultureService cultureService, IContentStateService contentStateService, INodeMapper nodeMapper)
            : base(cultureService, contentStateService, nodeMapper)
        {            
        }
    }

    public class ProductsInCategoriesRepository : ProductsInCategoriesRepository<ProductsInCategoriesCollection,
        ProductsInCategories>, IProductsInCategoriesRepository
    {
        public ProductsInCategoriesRepository(ICultureService cultureService, IContentStateService contentStateService, INodeMapper nodeMapper)
            : base(cultureService, contentStateService, nodeMapper)
        {
        }
    }

    public interface IProductsInCategoriesRepository<TItem>:IMedianamikRepository<TItem>
        where TItem: Interfaces.IProductsInCategories
    {
    }

    public interface IProductsInCategoriesRepository : IProductsInCategoriesRepository<ProductsInCategories>
    {}
}
